package cn.ultrarisk.sprinx.mybatis.dao;

import cn.ultrarisk.sprinx.domain.Entity;
import cn.ultrarisk.sprinx.mybatis.entity.Company;
import cn.ultrarisk.sprinx.mybatis.support.BaseDAO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * UserDAO
 *
 * @author sevendlong(lin23871@163.com)
 * @date 2014/10/9
 * @since V1.0
 */
@Repository
public class CompanyDAO extends BaseDAO<Company, Integer> {
    public CompanyDAO() {
        super(Company.class, Company.COLUMN_PROPERTY_MAP);
    }

    public List<Entity> stat(List<Integer> ids) {
        List<Map<String, Object>> data = sqlSessionTemplate.selectList("Company.stat", ids);
        return Entity.cast(data);
    }
}
